import { Navigate } from "react-router-dom";
import Login from "@/pages/Login";
import Home from "@/pages/Home";
import NotFound from "@/pages/404";
import News from "@/pages/Home/components/News";
import Music from "@/pages/Home/components/Music";
import Game from "@/pages/Home/components/Game";
import GameItem from "@/pages/Home/components/Game/Item";
const routes = [
  {
    path: "/",
    element: <Navigate to="/home" />,
  },
  {
    path: "/login",
    element: <Login />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "",
        element: <Navigate to="news" />,
      },
      {
        path: "news",
        element: <News />,
      },
      {
        path: "game",
        element: <Game />,
        children:[
          {
            path:'item',
            element:<GameItem />
          }
        ]
      },
      {
        path: "music",
        element: <Music />,
      },
    ],
  },
  {
    path: "/*",
    element: <NotFound />,
  },
];

export default routes;
